package com.effectivsocial.rest.controller;

/**
 * 
 */

import javax.inject.Inject;
import javax.inject.Named;

import lombok.extern.slf4j.Slf4j;

import org.springframework.social.twitter.api.BlockOperations;
import org.springframework.social.twitter.api.CursoredList;
import org.springframework.social.twitter.api.TwitterProfile;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.effectivsocial.rest.service.TwitterBlockService;



/**
 * @author Dhrubo
 * 
 */
@Named
@RequestMapping("v1/twitter/blockoperations/")
@Slf4j
public class TwitterBlockOperationsController implements BlockOperations {

	@Inject
	private TwitterBlockService twitterBlockService;

	@RequestMapping(value = "/blockbyid/{userId}", method = RequestMethod.POST)
	public TwitterProfile block(@PathVariable("userId") long userId) {
		return twitterBlockService.block(userId);
	}

	@RequestMapping(value = "/block/{screenName}", method = RequestMethod.POST)
	public TwitterProfile block(@PathVariable("screenName") String screenName) {
		return null;
	}

	@RequestMapping(value = "getallblockeduserids", method = RequestMethod.GET)
	public @ResponseBody CursoredList<Long> getBlockedUserIds() {
		log.info("##### BLOCKED USER IDS");
		return null;
	}

	@RequestMapping(value = "getallblockedusers", method = RequestMethod.GET)
	public @ResponseBody CursoredList<TwitterProfile> getBlockedUsers() {
		log.info("##### BLOCKED USER S");
		return null;
	}

	@RequestMapping(value = "/unblockbyid/{userId}", method = RequestMethod.POST)
	public TwitterProfile unblock(@PathVariable("userId") long userId) {
		// TODO Auto-generated method stub
		return null;
	}

	@RequestMapping(value = "/unblock/{screenName}", method = RequestMethod.POST)
	public TwitterProfile unblock(@PathVariable("screenName") String screenName) {
		// TODO Auto-generated method stub
		return null;
	}

	@RequestMapping(value = "/getblockeduserids/{cursor}", method = RequestMethod.GET)
	public CursoredList<Long> getBlockedUserIdsInCursor(
			@PathVariable("cursor") long cursor) {
		// TODO Auto-generated method stub
		return null;
	}

	@RequestMapping(value = "/getblockedusers/{cursor}", method = RequestMethod.GET)
	public CursoredList<TwitterProfile> getBlockedUsersInCursor(
			@PathVariable("cursor") long cursor) {
		// TODO Auto-generated method stub
		return null;
	}

}
